<% layout('/layouts/default.html', {title: '游泳馆信息', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<#form:form id="inputForm" model="${natatoriumInfo}" action="${ctx}/natatoriuminfo/natatoriumInfo/save" method="post" class="form-horizontal">
			<div class="box-body">
				<#form:hidden path="id"/>
				<#form:hidden path="phone"/>
				<#form:hidden path="principal"/>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('游泳馆名称')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="name" maxlength="45" class="form-control required"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2"><span class="required">*</span> ${text('列表大图')}：</label>
							<div class="col-sm-10">
								<#form:fileupload id="uploadImage" bizKey="${natatoriumInfo.id}" bizType="natatoriumInfo_image"
									uploadType="image" maxUploadNum="1" class="required" readonly="false"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2"> ${text('运动实拍')}：</label>
							<div class="col-sm-10">
								<#form:fileupload id="uploadImage1" bizKey="${natatoriumInfo.id}" bizType="movement_image"
									uploadType="image" maxUploadNum="40" class="" readonly="false"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2"> ${text('其它')}：</label>
							<div class="col-sm-10">
								<#form:fileupload id="uploadImage2" bizKey="${natatoriumInfo.id}" bizType="other_image"
									uploadType="image" maxUploadNum="40" class="" readonly="false"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2">${text('环境视频(mp4)')}：</label>
							<div class="col-sm-10">
								<#form:fileupload id="uploadFile" bizKey="${natatoriumInfo.id}" bizType="natatoriumInfo_media"
									uploadType="media" class="" readonly="false" maxUploadNum="40" allowSuffixes="mp4" 
									/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('场馆描述')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:textarea path="venueDescription" rows="6" maxlength="500" class="form-control required"/>
							</div>
						</div>
					</div>
				</div>				
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('场馆地址')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:textarea path="address" rows="4" maxlength="150" class="form-control required"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('营业状态')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="businessStatus" dictType="business_status" class="form-control required" />
							</div>
						</div>
					</div>
				</div>
				<div class="form-unit">${text('招聘相关信息')}</div>				
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								${text('经营领域')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="businessField" maxlength="50" class="form-control"/>
							</div>
						</div>
					</div>		
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								${text('员工人数')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="employeesNum" maxlength="20" class="form-control"/>
							</div>
						</div>
					</div>																	
				</div>								
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								${text('公司简介')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="companyProfile" maxlength="100" class="form-control"/>
							</div>
						</div>
					</div>		
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								${text('公司地点')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="companyLocation" maxlength="50" class="form-control"/>
							</div>
						</div>
					</div>																	
				</div>								
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								${text('招聘联系电话')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="recruitmentMobile" maxlength="20" class="form-control"/>
							</div>
						</div>
					</div>					
				</div>						
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if (hasPermi('natatoriuminfo:natatoriumInfo:edit')){ %>
							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
// 				js.closeCurrentTabPage(function(contentWindow){
// 					contentWindow.page();
// 				});
			}
		}, "json");
    }
});
</script>